package com.cby.jetpack.sample.paging3.viewmodel

import android.app.Application
import androidx.lifecycle.AndroidViewModel
import androidx.paging.Pager
import androidx.paging.PagingConfig
import com.cby.jetpack.sample.paging3.data.repository.GankGirlDataSource

/**
 * @description: GankGirlViewModel
 *
 * @author ChenBaoyang
 * @date 8/12/21 14:23
 */
class GankGirlViewModel(application: Application) : AndroidViewModel(application) {

    fun getGirlData() = Pager(PagingConfig(pageSize = 1)) {
        GankGirlDataSource()
    }.flow
}